import Vue from "vue";
import VueRouter from "vue-router";
import RouterModules from "./modules/index"; // 引入业务逻辑模块
import CommonRouters from "./common"; // 引入通用模块

Vue.use(VueRouter);

const router = new VueRouter({
  mode: "hash", // history需要服务端支持
  scrollBehavior: () => ({
    y: 0
  }),
  routes: [...RouterModules, ...CommonRouters]
});

export default router;
